package design.future;

public class RealData implements Data {
    private String result;
    @Override
    public String getRealData() {
        return result;
    }

    public RealData initRealData(String param) {
        System.out.println(" 根据 " + param + "进行查询，这是一个很耗时的操作。。" );
        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(" 操作完毕，获取结果 ");
        result = "查询结果";
        return this;
    }
}
